#ifndef STACKEDMAINWINDOW_H
#define STACKEDMAINWINDOW_H

#include <QCloseEvent>
#include <QMainWindow>
#include <QSettings>
#include <QSplitter>
#include <QTableView>
#include <QTreeView>

#include "src/ctextbrowser.h"
#include "src/ctableview.h"
#include "src/ctreeview.h"

namespace Ui {
    class StackedMainWindow;
}

class StackedMainWindow : public QMainWindow {
    Q_OBJECT
public:
    StackedMainWindow(QSettings*, QWidget *parent = 0);
    ~StackedMainWindow();

    CTextBrowser* textBrowser();
    CTableView* tableView();
    CTreeView* treeView();

    void show();
    void setTitle(QString) { }

public slots:
    void showSections();
    void showEntries();
    void showBrowser();

private slots:
    void backward();

protected:
    void changeEvent(QEvent *e);
    void closeEvent(QCloseEvent *e);

private:
    Ui::StackedMainWindow *m_ui;
    QSettings *m_set;

signals:
    void closed();
};

#endif // STACKEDMAINWINDOW_H
